package xyz.csmcool.imchat.service;

import org.springframework.web.multipart.MultipartFile;
import xyz.csmcool.imchat.entity.FileMessageVo;
import xyz.csmcool.imchat.entity.PrivateChats;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.csmcool.imchat.entity.vo.RoomChatsVo;
import xyz.csmcool.imutil.dto.LastMessageDto;
import xyz.csmcool.imutil.dto.LastPrivateMessageDto;
import xyz.csmcool.imutil.dto.PrivateMessage;
import xyz.csmcool.imutil.webVo.MyPage;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author csmcool
 * @since 2022-08-24
 */
public interface IPrivateChatsService extends IService<PrivateChats> {

    /**
     * 发送私信*
     * @param privateMessage
     * @param uid
     */
    void sendPrivateMessage(PrivateMessage<String> privateMessage,String uid);

    /**
     * 发送语音
     * @param file
     * @param uid
     * @param receiveId
     */
    void sendPrivateSoundMessage(MultipartFile file, String uid, Integer receiveId);

    /**
     * 发送图片
     * @param files
     * @param uid
     * @param receiveId
     */
    void sendPrivateImageMessage(MultipartFile[] files, String uid, Integer receiveId);

    /**
     * send*
     * @param fileMessageVo
     * @param uid
     */
    void sendPrivateFileMessage(FileMessageVo fileMessageVo, String uid);

    /**
     * 获取历史消息
     * @param page
     * @param limit
     * @param fid
     * @param id
     * @param uid
     * @return
     */
    MyPage<PrivateChats> getHistoryPrivateMessage(Long page, Long limit, Integer fid, Integer id, Integer uid);

    /**
     * 获取每个用户的最后一条信息*
     * @param ids
     * @param uid *
     * @return
     */
    List<LastPrivateMessageDto> getLastMessage(List<Integer> ids,Integer uid);
}
